﻿using System.Collections.Generic;

namespace MugenInjection.Xml.Interface
{
    /// <summary>
    /// Represents interface for access to xml element.
    /// </summary>
    public interface IXmlElement
    {
        /// <summary>
        /// Gets original element.
        /// </summary>
        object Element { get; }

        /// <summary>
        /// Gets element name.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets attribute with specified name.
        /// </summary>
        /// <param name="name">Specified name.</param>
        /// <returns>An instance of <see cref="string"/>.</returns>
        string GetAttribute(string name);

        /// <summary>
        /// Gets xml element with specified name.
        /// </summary>
        /// <param name="name">Specified name.</param>
        /// <returns>An instance of <see cref="IXmlElement"/>.</returns>
        IXmlElement GetNode(string name);

        /// <summary>
        /// Gets xml elements with specified name.
        /// </summary>
        /// <param name="name">Specified name.</param>
        /// <returns>A series instances of <see cref="IXmlElement"/>.</returns>
        IEnumerable<IXmlElement> GetNodes(string name);
    }
}